/****************************************************
	文件：OpenScriptTemplateDataEditor.cs
	作者：HuskyT
	邮箱：1005240602@qq.com
	日期：2021/8/19 15:44:43
	功能：打开脚本模板数据
*****************************************************/

using UnityEditor;
using UnityEngine;

namespace HTFramework.Utility.Editor
{
    public class OpenScriptTemplateDataEditor
    {
        static ScriptTemplateData mTemplateData;

        [MenuItem("HTFramework/Utility/3.OpenScriptTemplateData %T", false, 3)]
        static void OpenScriptTemplateData()
        {
            mTemplateData = ScriptTemplateMgr.TemplateData;

            if (mTemplateData != null)
            {
                EditorUtility.FocusProjectWindow();
                Selection.activeObject = mTemplateData; //高亮文件
            }
            else
            {
                Debug.LogError("请先在 \"Assets/HTFramework/Resources/ScriptTemplate/\" 文件夹内创建 ScriptTemplateData：右键/Create/HTFramework/Utility/ScriptTemplateData");
            }
        }
    }
}